Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/software/r/[name].tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Alert, Layout } from "antd";67import { SoftwareEnvNames } from "@cocalc/util/consts/software-envs";8import Footer from "components/landing/footer";9import Head from "components/landing/head";10import Header from "components/landing/header";11import Image from "components/landing/image";12import SoftwareLibraries from "components/landing/software-libraries";13import { Paragraph, Title } from "components/misc";14import A from "components/misc/A";15import { Customize, CustomizeType } from "lib/customize";16import { ExecutableDescription } from "lib/landing/render-envs";17import { withCustomizedAndSoftwareSpec } from "lib/landing/software-specs";18import {19ComputeComponents,20ComputeInventory,21SoftwareSpec,22} from "lib/landing/types";23import { STYLE_PAGE } from "..";24import screenshot from "/public/features/cocalc-r-jupyter.png";2526interface Props {27name: SoftwareEnvNames;28customize: CustomizeType;29spec: SoftwareSpec["R"];30inventory: ComputeInventory["R"];31components: ComputeComponents["R"];32execInfo?: { [key: string]: string };33timestamp: string;34}3536export default function R(props: Props) {37const { name, customize, spec, inventory, components, execInfo, timestamp } =38props;3940function renderBox() {41return (42<Alert43style={{ margin: "15px 0" }}44message="Learn More"45description={46<span style={{ fontSize: "10pt" }}>47Learn more about{" "}48<strong>49<A href="/features/r-statistical-software">50R functionality in CoCalc51</A>52</strong>53.54</span>55}56type="info"57showIcon58/>59);60}6162function renderIntro() {63return (64<>65<div style={{ width: "50%", float: "right", padding: "0 0 15px 15px" }}>66<Image src={screenshot} alt="Using R in a Jupyter notebook" />67</div>68<Paragraph>69This table lists all R pre-installed packages that are immediately70available in every CoCalc project running on the default "Ubuntu{" "}71{name}" image, along with their version numbers. If something is72missing, you can{" "}73<A href="https://doc.cocalc.com/howto/install-r-package.html">74install it yourself75</A>76, or request that we install them.77</Paragraph>78</>79);80}8182return (83<Customize value={customize}>84<Head title="R Packages in CoCalc" />85<Layout>86<Header page="software" subPage="r" softwareEnv={name} />87<Layout.Content88style={{89backgroundColor: "white",90}}91>92<div style={STYLE_PAGE}>93<Title level={1} style={{ textAlign: "center" }}>94Installed R Statistical Software Packages (Ubuntu {name})95</Title>96{renderIntro()}97{renderBox()}98<Title level={2} style={{ clear: "both" }}>99Available Environments100</Title>101<ExecutableDescription spec={spec} execInfo={execInfo} />102<SoftwareLibraries103timestamp={timestamp}104spec={spec}105inventory={inventory}106components={components}107libWidthPct={60}108/>109</div>110<Footer />111</Layout.Content>112</Layout>113</Customize>114);115}116117export async function getServerSideProps(context) {118return await withCustomizedAndSoftwareSpec(context, "R");119}120121122